package com.whj.apiboss.service.impl;

import com.whj.apiboss.remote.ServiceDriverClient;
import com.whj.apiboss.service.DriverCarBindingRelationShipService;
import com.whj.internalcommon.dto.DriverCarBindingRelationship;
import com.whj.internalcommon.dto.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Auther: wanghaijun
 * @Date: 2023/1/14 - 01 - 14 - 13:11 
 * @Description: com.whj.apiboss.service.impl
 */

@Service
public class DriverCarBindingRelationShipImpl implements DriverCarBindingRelationShipService {

    @Autowired
    private ServiceDriverClient serviceDriverClient;

    /**
     * 调用service-driver-user服务 实现司机和车辆的解绑
     *
     * @param driverCarBindingRelationship
     * @return
     */
    @Override
    public ResponseResult unbind(DriverCarBindingRelationship driverCarBindingRelationship) {
        return serviceDriverClient.unbind(driverCarBindingRelationship);
    }

    /**
     * 调用service-driver-user服务 实现司机和车辆的绑定
     *
     * @param driverCarBindingRelationship
     * @return
     */
    @Override
    public ResponseResult bind(DriverCarBindingRelationship driverCarBindingRelationship) {
        return serviceDriverClient.bind(driverCarBindingRelationship);
    }
}
